package org.jeecg.modules.demo.storestaffreward.controller;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

public class Test {
    public static void main(String[] args) {
        String s = "[{staffId:, staffInfo:, workActor:, shareWay:, value:0}, {staffId:, staffInfo:null, workActor:, shareWay:, value:0}]";
        s=s.replace("staffId:","\"staffId\":");
        s=s.replace("staffInfo:","\"staffInfo\":");
        s=s.replace("workActor:","\"workActor\":");
        s=s.replace("shareWay:","\"shareWay\":");
        s=s.replace("value:","\"value\":");
        s=s.replace(":,",":null,");
        System.out.println(s);
        JSONArray objects = JSONObject.parseArray(s);
        for (Object object : objects) {
            System.out.println(object.toString());
        }

    }
}
